import getopt, sys

def get_wls_opts():
    try:
        opts, args = getopt.getopt(sys.argv[1:], "ho:v", ["help", "output="])
    except getopt.GetoptError, err:
        # print help information and exit:
        print str(err) # will print something like "option -a not recognized"
        usage()
        sys.exit(2)
        
    output = None
    verbose = False
    for o, a in opts:
        if o == "-v":
            print 'Verbose = true'
            verbose = True            
        elif o in ("-h", "--help"):            
            usage()
            sys.exit()
        elif o in ("-o", "--output"):
            output = a
        else:
            assert False, "Unhandled option"


if __name__ == "__main__":
    get_wls_opts()
